package br.com.stourados.perfil.client;

import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.DecoratedTabPanel;
import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
import com.google.gwt.user.client.ui.TextArea;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.HasVerticalAlignment;
import com.google.gwt.user.client.ui.RichTextArea;
import com.google.gwt.user.client.ui.ScrollPanel;
import com.google.gwt.user.client.ui.Hyperlink;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.user.client.ui.SimplePanel;
import com.google.gwt.user.client.ui.Image;

public class WidgetSobreEstouratar extends Composite {

	private Button button_5,button_4,btnNewButton;
	private Label lblVocDiscordou,lblCurti;
	private Button button_7;
	private DialogBox imagePopup;
	
	public WidgetSobreEstouratar() {
		
		
		DecoratedTabPanel tabPanel = new DecoratedTabPanel();
		initWidget(tabPanel);
		tabPanel.setSize("441px", "286px");
		
		VerticalPanel verticalPanel_6 = new VerticalPanel();
		verticalPanel_6.setStyleName("vertical");
		tabPanel.add(verticalPanel_6, "Perfil", false);
		verticalPanel_6.setSize("5cm", "3cm");
		
		HTML htmlmuralStourados = new HTML("<a href=\"/mural.html\">Mural Stourados</a>", true);
		verticalPanel_6.add(htmlmuralStourados);
		
		ScrollPanel scrollPanel_2 = new ScrollPanel();
		verticalPanel_6.add(scrollPanel_2);
		scrollPanel_2.setSize("441px", "286px");
		
		VerticalPanel verticalPanel_7 = new VerticalPanel();
		scrollPanel_2.setWidget(verticalPanel_7);
		verticalPanel_7.setSize("100%", "272px");
		
		HorizontalPanel horizontalPanel_4 = new HorizontalPanel();
		horizontalPanel_4.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
		verticalPanel_7.add(horizontalPanel_4);
		horizontalPanel_4.setSize("405px", "25px");
		
		Label lblStatus = new Label("Status");
		lblStatus.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
		horizontalPanel_4.add(lblStatus);
		lblStatus.setSize("45px", "28px");
		
		TextArea txtrMeSintoTo = new TextArea();
		txtrMeSintoTo.setText("Me sinto t\u00E3o Stourado hoje. Sinto vontade de voar");
		horizontalPanel_4.add(txtrMeSintoTo);
		txtrMeSintoTo.setSize("240px", "30px");
		
		SimplePanel simplePanel_2 = new SimplePanel();
		horizontalPanel_4.add(simplePanel_2);
		simplePanel_2.setSize("49px", "25px");
		
		button_4 = new Button("Legal");
		button_4.setSize("100%", "100%");
		simplePanel_2.setWidget(button_4);
		button_4.addClickHandler(new ClickHandler() {
			public void onClick(ClickEvent event) {
				if(button_4.getText().equals("Legal")){
				button_4.setVisible(false);
				btnNewButton.setText("Limpar");
				lblCurti.setVisible(true);
				}else{
					button_4.setText("Legal");
					button_4.setVisible(true);
					btnNewButton.setText("Chato");
					btnNewButton.setVisible(true);
					lblCurti.setVisible(false);
					lblCurti.setText("Voc\u00EA achou legal.");
				}
			}
		});
		
		
		SimplePanel simplePanel_3 = new SimplePanel();
		horizontalPanel_4.add(simplePanel_3);
		simplePanel_3.setSize("52px", "25px");
		
		btnNewButton = new Button("Chato");
		simplePanel_3.setWidget(btnNewButton);
		btnNewButton.addClickHandler(new ClickHandler() {
			public void onClick(ClickEvent event) {
				if(btnNewButton.getText().equals("Chato")){
				button_4.setVisible(false);
				btnNewButton.setText("Limpar");
				lblCurti.setText("Voc\u00EA achou chato.");
				lblCurti.setStyleName("no");
				lblCurti.setVisible(true);
				}else{
					button_4.setText("Legal");
					button_4.setVisible(true);
					btnNewButton.setText("Chato");
					btnNewButton.setVisible(true);
					lblCurti.setVisible(false);
					lblCurti.setText("Voc\u00EA achou legal.");
				}
			}
		});
		btnNewButton.setSize("100%", "100%");
		
		SimplePanel simplePanel_1 = new SimplePanel();
		verticalPanel_7.add(simplePanel_1);
		simplePanel_1.setSize("435px", "18px");
		
		lblCurti = new Label("Voc\u00EA achou legal.");
		simplePanel_1.setWidget(lblCurti);
		lblCurti.setSize("100%", "100%");
		lblCurti.setWordWrap(false);
		lblCurti.setVisible(false);
		lblCurti.setStylePrimaryName("sim");
		
		HorizontalPanel horizontalPanel_5 = new HorizontalPanel();
		horizontalPanel_5.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
		verticalPanel_7.add(horizontalPanel_5);
		horizontalPanel_5.setSize("433px", "33px");
		
		Image image_6 = new Image((String) null);
		horizontalPanel_5.add(image_6);
		image_6.setSize("34px", "21px");
		
		HorizontalPanel horizontalPanel_6 = new HorizontalPanel();
		verticalPanel_7.add(horizontalPanel_6);
		horizontalPanel_6.setWidth("404px");
		
		Label label_9 = new Label("Porque sou Stourado:");
		horizontalPanel_6.add(label_9);
		
		RichTextArea richTextArea_1 = new RichTextArea();
		richTextArea_1.setText("Eu n\u00E3o acho que sou Stourado, os outros que acham.");
		verticalPanel_7.add(richTextArea_1);
		richTextArea_1.setSize("397px", "138px");
		
		HorizontalPanel horizontalPanel_7 = new HorizontalPanel();
		horizontalPanel_7.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
		horizontalPanel_7.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
		verticalPanel_7.add(horizontalPanel_7);
		horizontalPanel_7.setWidth("407px");
		
		HorizontalPanel horizontalPanel = new HorizontalPanel();
		horizontalPanel_7.add(horizontalPanel);
		horizontalPanel.setSize("139px", "18px");
		
		lblVocDiscordou = new Label("Voc\u00EA discordou.");
		horizontalPanel.add(lblVocDiscordou);
		lblVocDiscordou.setWidth("118px");
		lblVocDiscordou.setStyleName("no");
		lblVocDiscordou.setVisible(false);
		
		HorizontalPanel horizontalPanel_1 = new HorizontalPanel();
		horizontalPanel_1.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
		horizontalPanel_7.add(horizontalPanel_1);
		horizontalPanel_1.setWidth("150px");
		
		button_5 = new Button("New button");
		horizontalPanel_1.add(button_5);
		button_5.addClickHandler(new ClickHandler() {
			public void onClick(ClickEvent event) {
				button_5.setVisible(false);
				button_7.setText("Limpar");
				lblVocDiscordou.setText("Voc\u00EA concordou");
				lblVocDiscordou.setVisible(true);
			
			}
		});
		button_5.setText("Concordo");
		button_5.setSize("89px", "25px");
		
		SimplePanel simplePanel = new SimplePanel();
		horizontalPanel_7.add(simplePanel);
		simplePanel.setWidth("137px");
		
		button_7 = new Button("New button");
		simplePanel.setWidget(button_7);
		button_7.addClickHandler(new ClickHandler() {
			public void onClick(ClickEvent event) {
				if(button_7.getText().equals("Discordo")){
					button_5.setVisible(false);
					button_7.setText("Limpar");
					lblVocDiscordou.setVisible(true);
				}else{
					button_5.setVisible(true);
					button_7.setText("Discordo");
					lblVocDiscordou.setVisible(false);
					lblVocDiscordou.setText("Voc\u00EA Discordou");
				}
			}
		});
		
		button_7.setText("Discordo");
		button_7.setSize("89px", "25px");
		
		VerticalPanel verticalPanel = new VerticalPanel();
		verticalPanel.setStyleName("vertical");
		tabPanel.add(verticalPanel, "Fotos", false);
		verticalPanel.setSize("5cm", "3cm");
		
		Hyperlink hyperlink = new Hyperlink("Meus Julgamentos", false, "newHistoryToken");
		hyperlink.setHTML("Album");
		verticalPanel.add(hyperlink);
		
		VerticalPanel verticalPanel_3 = new VerticalPanel();
		verticalPanel.add(verticalPanel_3);
		verticalPanel_3.setSize("441px", "286px");
		
		HorizontalPanel horizontalPanel_2 = new HorizontalPanel();
		horizontalPanel_2.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
		horizontalPanel_2.setStyleName("borderBottom");
		verticalPanel_3.add(horizontalPanel_2);
		horizontalPanel_2.setSize("438px", "127px");
		
		Image image = new Image("img/face.JPG");
		image.addClickHandler(new ClickHandler() {
			public void onClick(ClickEvent event) {
				imagePopup.center();
			}
		});
		horizontalPanel_2.add(image);
		image.setSize("104px", "133px");
		
		Image image_1 = new Image("img/face.JPG");
		image_1.addClickHandler(new ClickHandler() {
			public void onClick(ClickEvent event) {
				imagePopup.center();
			}
		});
		horizontalPanel_2.add(image_1);
		image_1.setSize("104px", "133px");
		
		Image image_2 = new Image("img/face.JPG");
		horizontalPanel_2.add(image_2);
		image_2.setSize("104px", "133px");
		
		HorizontalPanel horizontalPanel_3 = new HorizontalPanel();
		horizontalPanel_3.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
		verticalPanel_3.add(horizontalPanel_3);
		horizontalPanel_3.setWidth("424px");
		
		Image image_3 = new Image("img/face.JPG");
		horizontalPanel_3.add(image_3);
		image_3.setSize("104px", "133px");
		
		Image image_4 = new Image("img/face.JPG");
		horizontalPanel_3.add(image_4);
		image_4.setSize("104px", "133px");
		
		Image image_5 = new Image("img/face.JPG");
		horizontalPanel_3.add(image_5);
		image_5.setSize("104px", "133px");
		
		VerticalPanel verticalPanel_8 = new VerticalPanel();
		verticalPanel_8.setStyleName("vertical");
		tabPanel.add(verticalPanel_8, "Recados", false);
		verticalPanel_8.setSize("5cm", "3cm");
		
		Hyperlink hprlnkRecados = new Hyperlink("Recados", false, "newHistoryToken");
		verticalPanel_8.add(hprlnkRecados);
		
		VerticalPanel verticalPanel_9 = new VerticalPanel();
		verticalPanel_9.setStyleName("vertical");
		verticalPanel_8.add(verticalPanel_9);
		verticalPanel_9.setSize("441px", "286px");
		
		VerticalPanel verticalPanel_1 = new VerticalPanel();
		verticalPanel_1.setStyleName("vertical");
		tabPanel.add(verticalPanel_1, "Bate-Bola", false);
		verticalPanel_1.setSize("5cm", "3cm");
		
		Hyperlink hprlnkNewHyperlink = new Hyperlink("Perguntar", false, "newHistoryToken");
		verticalPanel_1.add(hprlnkNewHyperlink);
		
		ScrollPanel scrollPanel = new ScrollPanel();
		verticalPanel_1.add(scrollPanel);
		scrollPanel.setSize("441px", "286px");
		
		VerticalPanel verticalPanel_4 = new VerticalPanel();
		verticalPanel_4.setStyleName("vertical");
		scrollPanel.setWidget(verticalPanel_4);
		verticalPanel_4.setSize("100%", "272px");
		

		
		WdgtPergunta wdgtPergunta = new WdgtPergunta();
		verticalPanel_4.add(wdgtPergunta);
		
		WdgtPergunta wdgtPergunta_1 = new WdgtPergunta();
		verticalPanel_4.add(wdgtPergunta_1);
		
		WdgtPergunta wdgtPergunta_2 = new WdgtPergunta();
		verticalPanel_4.add(wdgtPergunta_2);
		
		WdgtPergunta wdgtPergunta_3 = new WdgtPergunta();
		verticalPanel_4.add(wdgtPergunta_3);
		
		WdgtPergunta wdgtPergunta_4 = new WdgtPergunta();
		verticalPanel_4.add(wdgtPergunta_4);
		
		VerticalPanel verticalPanel_2 = new VerticalPanel();
		verticalPanel_2.setStyleName("vertical");
		tabPanel.add(verticalPanel_2, "Julgamento", false);
		verticalPanel_2.setSize("5cm", "3cm");
		
		Hyperlink hprlnkNewHyperlink_1 = new Hyperlink("Meus Julgamentos", false, "newHistoryToken");
		verticalPanel_2.add(hprlnkNewHyperlink_1);

		ScrollPanel scrollPanel_1 = new ScrollPanel();
		verticalPanel_2.add(scrollPanel_1);
		scrollPanel_1.setSize("441px", "286px");

		
		VerticalPanel verticalPanel_5 = new VerticalPanel();
		verticalPanel_5.setStyleName("vertical");
		scrollPanel_1.setWidget(verticalPanel_5);
		verticalPanel_5.setSize("100%", "272px");
		
		verticalPanel_5.add(new Julgamento());
		verticalPanel_5.add(new Julgamento());
		verticalPanel_5.add(new Julgamento());
		verticalPanel_5.add(new Julgamento());
		verticalPanel_5.add(new Julgamento());
		verticalPanel_5.add(new Julgamento());
		verticalPanel_5.add(new Julgamento());
		verticalPanel_5.add(new Julgamento());
		verticalPanel_5.add(new Julgamento());
		
		
	    imagePopup = new DialogBox(true);
	    imagePopup.setAnimationEnabled(true);
	    imagePopup.setGlassEnabled(true);
	    imagePopup.setWidget(new Image("img/face.JPG"));
		
	    
	    
		tabPanel.selectTab(0);
	}

}
